/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mahumLogs.Bean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
/**
 *
 * @author Edouard
 */
@Entity
public class Etudiant extends Personne implements Serializable{
    
    private String login;
    private String password;
    
    @ManyToOne(cascade = CascadeType.PERSIST)
    @JoinColumn(name="FK_PROMOTION",insertable=false,updatable=false)
    private Promotion promotion = new Promotion();
    
    @OneToMany(mappedBy = "Etudiant",cascade = CascadeType.PERSIST)
    private List<Machine> listeMachines = new ArrayList<>();

    public Etudiant() {
    }

    public String getLogin() {
        return login;
    }

    public void setLogin(String login) {
        this.login = login;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Promotion getPromotion() {
        return promotion;
    }

    public void setPromotion(Promotion promotion) {
        this.promotion = promotion;
    }

    public List<Machine> getListeMachines() {
        return listeMachines;
    }

    public void setListeMachines(List<Machine> listeMachines) {
        this.listeMachines = listeMachines;
    }
    
    
}
